package mapping

import (
	"simcard/model"
	"simcard/model/entity"
)

// PrepaidsEntityToDto entity data transfer
func PrepaidsEntityToDto(prepaids []*entity.Prepaid) []*model.PrepaidInfo {
	out := make([]*model.PrepaidInfo, 0, len(prepaids))
	for _, c := range prepaids {
		out = append(out, PrepaidEntityToDto(c))
	}
	return out
}

// PrepaidEntityToDto entity data transfer
func PrepaidEntityToDto(e *entity.Prepaid) *model.PrepaidInfo {
	return &model.PrepaidInfo{

		Id: e.Id,

		PaymentId: e.PaymentId,

		EbikeId: e.EbikeId,

		Sn: e.Sn,

		EffectiveDate: e.EffectiveDate,

		ExpiredDate: e.ExpiredDate,

		Status: e.Status,
		Source: e.Source,

		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,
	}
}
